<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第五题</title>
    <style>
        table {
            border: 1px solid black;
            width: 400px;
            height: 50px;
            margin: 0 auto;
        }

        table th {
            border-right: 1px solid black;
            width: 60px;
            height: 25px;
        }

        table th:last-child {
            border-right: 0px solid black;
        }
    </style>
</head>

<body>


    <script>
        const students = [
            { name: '小明', age: 18, gender: '男', hometown: '河北省' },
            { name: '小红', age: 19, gender: '女', hometown: '河南省' },
            { name: '小刚', age: 17, gender: '男', hometown: '山西省' },
            { name: '小丽', age: 18, gender: '女', hometown: '山东省' },
            { name: '晓强', age: 16, gender: '女', hometown: '蓝翔技校' }
        ]
        for (let i = 0; i < students.length; i++) {
            document.write(`
                <table>
                    <tr>
                        <th>${students[i].name}</th>
                        <th>${students[i].age}</th>
                        <th>${students[i].gender}</th>
                        <th>${students[i].hometown}</th>
                    </tr>
                </table>`)
        }
    </script>
</body>

</html>